﻿<Window x:Class="Wintellect.LiveFx.Cloudboard.Options"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Wintellect.LiveFx.Cloudboard"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    Title="Options" Height="400" Width="600" WindowStartupLocation="CenterScreen" Icon="/Cloudboard;component/Resources/Clipboard.ico">
  <Window.Resources>
    <ObjectDataProvider
      MethodName="GetValues"
      ObjectType="{x:Type s:Enum}"
      x:Key="Keys">
      <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="local:AvailableHotkeys" />
      </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>
  </Window.Resources>
    <Grid>
    <TabControl Margin="0,0,0,44" Name="optionTabs">
      <TabItem Header="General" Name="generalTab">
        <Grid>
          <GroupBox Margin="7,6,7,0" Name="startupBehavior" Height="100.04" VerticalAlignment="Top">
            <Grid>
              <CheckBox Height="16" Margin="10,10,61,0" Name="startOnLogin" VerticalAlignment="Top">Start Cloudboard when I log in</CheckBox>
              <CheckBox Height="16" Margin="10,34,61,0" Name="checkForUpdates" VerticalAlignment="Top" Visibility="Collapsed" >Check for updates</CheckBox>
            </Grid>
          </GroupBox>
          <GroupBox Header="Hotkeys" Margin="6,114,7,39" Name="hotKeyConfiguration">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24" />
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="151*" />
              </Grid.ColumnDefinitions>
              <Label Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" ForceCursor="True" Margin="0,0,0,0">Copy an item to my Cloudboard when I press:</Label>
              <local:HotkeyControl Grid.Row="1" x:Name="copyHotkeyEntry"  Height="24" />
              <Label Grid.Row="2" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" ForceCursor="True" Margin="0,0,0,0">Show the contents of the Cloudboard when I press:</Label>
              <local:HotkeyControl Grid.Row="3" x:Name="uiHotkeyEntry"  Height="24" />
            </Grid>
          </GroupBox>
        </Grid>
      </TabItem>
      <TabItem Header="Cloudboards" Name="cloudboardsTab">
        <Grid>
          <ListView IsSynchronizedWithCurrentItem="True" Margin="6,10,7,36" Name="cloudBoards" MouseDoubleClick="cloudBoards_MouseDoubleClick" SelectionChanged="cloudBoards_SelectionChanged">
            <ListView.ItemContainerStyle>
              <Style TargetType="ListViewItem">
                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
              </Style>
            </ListView.ItemContainerStyle>
            <ListView.View>
              <GridView AllowsColumnReorder="False" ColumnHeaderToolTip="This is the Cloudboard that will appear at startup.">
                <GridViewColumn Width="20">
                  <GridViewColumn.CellTemplate>
                    <DataTemplate>
                      <Image x:Name="defaultClipboard" ToolTip="This is the" HorizontalAlignment="Center" Source="Resources\Default.png" Visibility="Collapsed" />
                      <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding Mode=OneWay, Path=Default}" Value="true">
                          <Setter TargetName="defaultClipboard" Property="Visibility" Value="Visible"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding Mode=OneWay, Path=Default}" Value="false">
                          <Setter TargetName="defaultClipboard" Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                      </DataTemplate.Triggers>
                    </DataTemplate>
                  </GridViewColumn.CellTemplate>
                  <GridViewColumnHeader HorizontalContentAlignment="Stretch">
                    <TextBlock></TextBlock>
                  </GridViewColumnHeader>
                </GridViewColumn>
                <GridViewColumn DisplayMemberBinding="{Binding Mode=OneWay, Path=Title}" Width="120">
                  <GridViewColumnHeader HorizontalContentAlignment="Stretch">
                    <TextBlock>Name</TextBlock>
                  </GridViewColumnHeader>
                </GridViewColumn>
                <GridViewColumn DisplayMemberBinding="{Binding Mode=OneWay, Path=Author}" Width="120">
                  <GridViewColumnHeader HorizontalContentAlignment="Stretch">
                    <TextBlock>Owner</TextBlock>
                  </GridViewColumnHeader>
                </GridViewColumn>
                <GridViewColumn DisplayMemberBinding="{Binding Mode=OneWay, Path=LastUpdated}" Width="160">
                  <GridViewColumnHeader HorizontalContentAlignment="Stretch">
                    <TextBlock>Last Updated</TextBlock>
                  </GridViewColumnHeader>
                </GridViewColumn>
              </GridView>
            </ListView.View>
          </ListView>
          <StackPanel Height="24" Margin="6" Name="stackPanel1" VerticalAlignment="Bottom" FlowDirection="LeftToRight" Orientation="Horizontal" >
            <Button Height="24" Width="72" Name="setDefault" Padding="1" Margin="2,0" Click="setDefault_Click" IsEnabled="False">Set Default</Button>
            <Button Height="24" Width="72" Name="add" Margin="2,0" IsEnabled="True" Click="add_Click">Add</Button>
            <Button Height="24" Width="72" Name="remove" Margin="2,0" Click="remove_Click">Remove</Button>
            <Button Height="24" Width="72" Name="properties" Margin="2,0" IsEnabled="False">Properties</Button>
          </StackPanel>
        </Grid>
      </TabItem>
    </TabControl>
    <Button Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="cancel" VerticalAlignment="Bottom" Width="75" IsCancel="True" Click="cancel_Click">Cancel</Button>
    <Button Height="23" Margin="0,0,93,12" Name="ok" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="76" IsDefault="True" Click="ok_Click">OK</Button>
  </Grid>
</Window>
